package com.example.yimai.entity;


import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.time.LocalDate;
import java.util.Date;

@Data
@TableName("easybuy_news")
@Document(indexName = "news")
public class News {
    @TableId(type = IdType.AUTO)
    @Id
    private String id;

    @Field(type = FieldType.Text)
    private String title;

    @Field(type = FieldType.Text)
    private String content;

    @TableField(value = "createTime")
    @Field(type = FieldType.Date)
    private LocalDate createTime;

    @TableLogic(value = "0", delval = "1")
    private int deleted;

}
